﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WPF项目.Common.Models;

namespace WPF项目.ViewModels
{
   public class MemoViweModel:BindableBase
    {
        public MemoViweModel()
    {
        AgentMatters = new ObservableCollection<SoftwareData>();
        Create_AgentMatters_Lisr();
        ADDpopup = new DelegateCommand(Add);
    }
    private bool isrightdraweropen;
    /// <summary>
    /// 控制右侧展开
    /// </summary>
    public bool IsRightDrawerOpen
    {
        get { return isrightdraweropen; }
        set { isrightdraweropen = value; RaisePropertyChanged(); }
    }
    /// <summary>
    /// 添加备忘录
    /// </summary>
    private void Add()
    {
        IsRightDrawerOpen = true;
    }

    public DelegateCommand ADDpopup { get; private set; }


    private ObservableCollection<SoftwareData> agentmatters;

    public ObservableCollection<SoftwareData> AgentMatters
    {
        get { return agentmatters; }
        set { agentmatters = value; RaisePropertyChanged(); }
    }

    void Create_AgentMatters_Lisr()
    {
        for (int i = 0; i < 30; i++)
        {
            AgentMatters.Add(new SoftwareData() { Title = "代办" + i, Content = "正在处理。。。" });
        }
    }
}
}
